package com.voipAgent;
public class TZMessage {
	public static final int MSG_TEXT_RECV = 0;
	public static final int MSG_TEXT_SEND = 1;
	public static final int MSM_SMS_RECV = 2;
	public static final int MSG_SMS_SEND = 3;
	public static final int MSG_VOICE_RECV = 4;
	public static final int MSG_VOICE_SEND = 5;
	public static final int MSG_ADD_XMPP_CONTACT_SEND = 6;
	public static final int MSG_ADD_XMPP_CONTACT_RECV = 7;
	private String toNumber="";//接收方
	private String fromNumber="";//发送人
	private String content = "";//发送内容
	private String attachment = "";//附加数据
	private long audioTime;//发送音频文件的长度
	private int type;//消息类型
	public TZMessage(TZMessage tzMessage){
		this.fromNumber=tzMessage.getFromNumber();
		this.toNumber=tzMessage.getToNumber();
		this.content=tzMessage.getContent();
		this.attachment=tzMessage.getAttachment();
		this.audioTime=tzMessage.getAudioTime();
		this.type=tzMessage.getType();
	}
	public TZMessage(){
		super();
	}
	public String getToNumber() {
		return toNumber;
	}

	public void setToNumber(String toNumber) {
		this.toNumber = toNumber;
	}

	public String getFromNumber() {
		return fromNumber;
	}
	public void setFromNumber(String fromNumber) {
		this.fromNumber = fromNumber;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getAttachment() {
		return attachment;
	}
	public void setAttachment(String attachment) {
		this.attachment = attachment;
	}
	public long getAudioTime() {
		return audioTime;
	}
	public void setAudioTime(long audioTime) {
		this.audioTime = audioTime;
	}
	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}
		
	public boolean isVoice() {
		return (type == MSG_VOICE_RECV) || (type == MSG_VOICE_SEND);
	}
}
